package bean;

/**
 * UserAttractionId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class UserAttractionId implements java.io.Serializable {

	// Fields

	private User user;
	private Attractions attractions;

	// Constructors

	/** default constructor */
	public UserAttractionId() {
	}

	/** full constructor */
	public UserAttractionId(User user, Attractions attractions) {
		this.user = user;
		this.attractions = attractions;
	}

	// Property accessors

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Attractions getAttractions() {
		return this.attractions;
	}

	public void setAttractions(Attractions attractions) {
		this.attractions = attractions;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof UserAttractionId))
			return false;
		UserAttractionId castOther = (UserAttractionId) other;

		return ((this.getUser() == castOther.getUser()) || (this.getUser() != null
				&& castOther.getUser() != null && this.getUser().equals(
				castOther.getUser())))
				&& ((this.getAttractions() == castOther.getAttractions()) || (this
						.getAttractions() != null
						&& castOther.getAttractions() != null && this
						.getAttractions().equals(castOther.getAttractions())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUser() == null ? 0 : this.getUser().hashCode());
		result = 37
				* result
				+ (getAttractions() == null ? 0 : this.getAttractions()
						.hashCode());
		return result;
	}

}